feat(cli): reconcile exact local Runtime Host restarts - #3920
Merged
Astro-Han merged 3 commits intoAug 26, 2026
Merged
Conversation
This was referenced Aug 26, 2026
Astro-Han
reviewed
Aug 26, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
I reviewed this head and found no blocking issues.
Implements exact local Runtime Host restarts via staged handoff with generation/pid identity checks, ephemeral-only guard, and idempotent replay; hosted test+windows_recovery SUCCESS.
No P0-P3.
简体中文
该头无阻断。Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
Astro-Han
approved these changes
Aug 26, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
APPROVE — f6ab656, no P0-P3, hosted checks SUCCESS, per me2seeks pre-auth for this batch.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
Closed
20 tasks
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npx, remote Hosts, service Hosts, unknown lifecycle modes, and active/durable work outside this mutation path.The restart path is deliberately bounded. Compatible release skew still connects without forcing replacement. A released Host that reports active or durable work is not interrupted by the legacy adapter; the TUI returns to truthful wait/cancel guidance. Explicit npm package switching and a newer active-work retirement adapter remain follow-up work in #3243/#3245.
Architecture
This adds no deployment journal, scheduler, or second authority lock. Initial claim and existing-owner handoff both hold the account-local deployment authority; the State Root writer remains the cutover fence. Registry integrity is artifact identity, while the transaction-derived generation is only a launch/retry fence. A normally connecting CLI fails closed if a staged Host is Ready but its durable CLI ownership was not committed.
Refs #3231
Refs #3243
Refs #3245
Refs #3709
简体中文
本 PR 交付 #3243 的下一条本地主线:把 managed-service 已有的 integrity-keyed package store 抽成共享实现;npm-global CLI 根据稳定 installation owner 与 registry SHA-512 证据,在任何 authority mutation 前固化精确可运行 closure;无 owner record 时先完成 exact takeover/Ready 再建立 initial claim,已有 owner 时继续走唯一 durable handoff。
TUI 只在用户明确选择 Restart 后调用该流程。
npx、remote、service、未知 lifecycle 与仍有 active/durable work 的旧 Host 都不会被这条 legacy adapter 强制替换。compatible release skew 也不会仅因版本字符串不同而自动重启。显式 npm package switch、active-work retirement capability 和完整中文交互仍由 #3243/#3245 后续切片承担。没有新增 deployment journal、scheduler 或第二把 authority lock;transaction generation 只是 launch/retry fence,不冒充 artifact identity。若 staged Host 已 Ready 但 durable CLI owner 未提交,普通连接会 fail closed,而不是静默继续。
Verification
@maka/core,@maka/storage,@maka/mcp,@maka/runtime,@maka/runtime-host,@maka/eval, andmaka-agentfrom the exact rebased head;git diff --checkpassed.AI use
Tool(s) and scope: Codex assisted with source-first architecture analysis, implementation, tests, simplification review, first-principles review, and PR drafting. The human contributor will review the PR before merge.
Checklist
Does this PR entail a change in behavior?